﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace TileSetConverter
{
    public abstract class TileSet
    {
        protected string filepath;
        protected BinaryReader br;
        protected List<TileSetTile> tiles;

        #region Properties
        public List<TileSetTile> Tiles
        {
            get { return tiles; }
        }
        #endregion
        public void Save(string filename)
        {
            FileStream fs = new FileStream(filename, FileMode.Create);
            BinaryWriter bw = new BinaryWriter(fs);
            for (int i = 0; i < 800; i++)
            {
                SaveBlock(bw, i);
            }
            bw.Close();
            fs.Close();
        }
        protected abstract void SaveBlock(BinaryWriter bw, int index);
    }
}
